/*
	Constants.h

	Universe constants such as the tick rate
	(c)1999 Palestar Development, Richard Lyle
*/

#ifndef GAME_CONSTANTS_H
#define GAME_CONSTANTS_H

#include "World/Constants.h"

//---------------------------------------------------------------------------------------------------

const Color UNIVERSE_AMBIENT( 0, 0, 16 );

//----------------------------------------------------------------------------

enum Faction
{
	FACTION_UNKNOWN			=	0,
	FACTION_NEUTRAL			=	1,
	FACTION_UGTO			=	2,			
	FACTION_ICC				=	3,			
	FACTION_KLUTH			=	4,	
	FACTION_HUMAN_ALLIANCE	=	5,
	FACTION_PIRATE			=	6,
	FACTION_MI				=	7,
	FACTION_TEROS			=	8,
	FACTION_COUNT
};

// types of damage
enum DamageType
{
	DAMAGE_KINETIC		= 0x1,				// causes damage to hull
	DAMAGE_ENERGY		= 0x2,				// causes damage to shields
	DAMAGE_PSI			= 0x4,				// causes damage to crew
	DAMAGE_EMP			= 0x8,				// causes damage to gadgets
	DAMAGE_BIO			= 0x10,				// causes damage to life
	DAMAGE_ELF			= 0x20,				// drains energy
	DAMAGE_PLANET		= 0x40,				// can cause damage to planet and structure / units on planet

	// Currently, this is limited to 0x80, since a byte is used to transmit this damage type..
};

// types of resources
enum ResourceType				// types of resoures
{
	CYRO_METALS,
	DARK_MATTER,
	FOOD,
	HEAVY_METALS,
	HYDROGEN,
	HYPER_MATTER,
	METALS,
	OXYGEN,
	URDANIAM,

	RESOURCE_TYPE_LAST
};

// player ranks
enum Rank
{
	CADET = -1,
	MIDSHIPMAN,
	ENSIGN,
	LIEUTENANT2,
	LIEUTENANT1,
	LIEUTENANT_COMMANDER,
	COMMANDER,
	CAPTAIN,
	REAR_ADMIRAL2,
	REAR_ADMIRAL1,
	VICE_ADMIRAL,
	ADMIRAL,
	FLEET_ADMIRAL,
	GRAND_ADMIRAL,
	MARSHAL,
	CHIEF_MARSHAL,
	
	FIRST_RANK = CADET,
	LAST_RANK = CHIEF_MARSHAL
};

enum Race
{
	RACE_NONE,
	RACE_HUMAN,
	RACE_KLUTH,
	RACE_MI,

	RACE_COUNT
};

enum Tech
{
	TECH_NEUTRAL,
	TECH_UGTO,
	TECH_ICC,
	TECH_KLUTH,
	TECH_PIRATE,
	TECH_MI,
	TECH_TEROS,

	TECH_UNKNOWN = 255,
};

// Facing enum is used to determine hit directions for ships etc... this breaks
// down a direction into 1 of 4 possible directions. This is much smaller to send over
// the network than the 3 floats required for a real 3D direction
enum Facing
{
	FACING_FRONT,
	FACING_RIGHT,
	FACING_LEFT,
	FACING_BACK
};

enum Badges
{
	BRONZE_NAVIGATOR,
	SILVER_NAVIGATOR,
	GOLD_NAVIGATOR,
	BRONZE_ENGINEER,
	SILVER_ENGINEER,
	GOLD_ENGINEER,
	BRONZE_COMBAT,
	SILVER_COMBAT,
	GOLD_COMBAT,
	BRONZE_TRANSPORT,
	SILVER_TRANSPORT,
	GOLD_TRANSPORT,
	BRONZE_BOMBER,
	SILVER_BOMBER,
	GOLD_BOMBER,
	BRONZE_PRIVATEER,
	SILVER_PRIVATEER,
	GOLD_PRIVATEER,
	BRONZE_SUPPORT,
	SILVER_SUPPORT,
	GOLD_SUPPORT,

	FIRST_BADGE = BRONZE_NAVIGATOR,
	LAST_BADGE = GOLD_SUPPORT,
};

enum Medals								
{
	SIRIUS_COMBAT,
	BRONZE_STAR,
	SILVER_STAR,
	GOLD_STAR,
	BRAVERY,
	VALOR,
	DEFENSE,
	STAR_FURY,
	CONQUEROR,

	FIRST_MEDAL = SIRIUS_COMBAT,
	LAST_MEDAL = CONQUEROR,
};

enum Statistics
{
	GAMES_PLAYED,
	TIME_PLAYED,
	KILLS,
	KILLED,
	BONUS_PRESTIGE,
	SHIPS_DAMAGED,
	SHIPS_CAPTURED,
	PLANETS_DAMAGED,
	PLANETS_CAPTURED,
	FRIENDLY_FIRE,
	REPAIR,
	CONSTRUCTION,
	KAMIKAZE,
	SELF_DESTRUCTS,
	JUMPS,
	PLANET_COLLISIONS,
	RESOURCES_LOST,
	SCOUT,

	FIRST_STATISTIC = GAMES_PLAYED,
	LAST_STATISTIC = SCOUT,
};

//----------------------------------------------------------------------------

IMPLEMENT_RAW_STREAMING( ResourceType );
IMPLEMENT_RAW_STREAMING( Rank );
IMPLEMENT_RAW_STREAMING( Race );
IMPLEMENT_RAW_STREAMING( Tech );
IMPLEMENT_RAW_STREAMING( Facing );
IMPLEMENT_RAW_STREAMING( Badges );
IMPLEMENT_RAW_STREAMING( Medals );
IMPLEMENT_RAW_STREAMING( Statistics );

#endif

//----------------------------------------------------------------------------
// EOF
